Integrand size = 35, antiderivative size = 93 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {\left (c d^2+b e^2\right ) \sqrt {d-e x} \sqrt {d+e x}}{e^4}+\frac {c (d-e x)^{3/2} (d+e x)^{3/2}}{3 e^4}-\frac {a \text {arctanh}\left (\frac {\sqrt {d-e x} \sqrt {d+e x}}{d}\right )}{d} \]
1/3*c*(-e*x+d)^(3/2)*(e*x+d)^(3/2)/e^4-a*arctanh((-e*x+d)^(1/2)*(e*x+d)^(1 /2)/d)/d-(b*e^2+c*d^2)*(-e*x+d)^(1/2)*(e*x+d)^(1/2)/e^4
Time = 0.26 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.14 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {\sqrt {d-e x} \sqrt {d+e x} \left (2 c d^2+3 b e^2+c e^2 x^2\right )}{3 e^4}+\frac {a \log \left (-1+\frac {\sqrt {d+e x}}{\sqrt {d-e x}}\right )}{d}-\frac {a \log \left (d+\frac {d \sqrt {d+e x}}{\sqrt {d-e x}}\right )}{d} \]
-1/3*(Sqrt[d - e*x]*Sqrt[d + e*x]*(2*c*d^2 + 3*b*e^2 + c*e^2*x^2))/e^4 + ( a*Log[-1 + Sqrt[d + e*x]/Sqrt[d - e*x]])/d - (a*Log[d + (d*Sqrt[d + e*x])/ Sqrt[d - e*x]])/d
Time = 0.37 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.15, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {1905, 1578, 1192, 25, 1467, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx\) |
\(\Big \downarrow \) 1905 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^4+b x^2+a}{x \sqrt {d^2-e^2 x^2}}dx}{\sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1578 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^4+b x^2+a}{x^2 \sqrt {d^2-e^2 x^2}}dx^2}{2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1192 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \int -\frac {c x^8-\left (2 c d^2+b e^2\right ) x^4+c d^4+a e^4+b d^2 e^2}{d^2-x^4}d\sqrt {d^2-e^2 x^2}}{e^4 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^8-\left (2 c d^2+b e^2\right ) x^4+c d^4+a e^4+b d^2 e^2}{d^2-x^4}d\sqrt {d^2-e^2 x^2}}{e^4 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1467 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \int \left (\frac {a e^4}{d^2-x^4}+b e^2-c x^4+c d^2\right )d\sqrt {d^2-e^2 x^2}}{e^4 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \left (-\frac {a e^4 \text {arctanh}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right )}{d}-\sqrt {d^2-e^2 x^2} \left (b e^2+c d^2\right )+\frac {c x^6}{3}\right )}{e^4 \sqrt {d-e x} \sqrt {d+e x}}\) |
(Sqrt[d^2 - e^2*x^2]*((c*x^6)/3 - (c*d^2 + b*e^2)*Sqrt[d^2 - e^2*x^2] - (a *e^4*ArcTanh[Sqrt[d^2 - e^2*x^2]/d])/d))/(e^4*Sqrt[d - e*x]*Sqrt[d + e*x])
3.2.35.3.1 Defintions of rubi rules used
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[2/e^(n + 2*p + 1) Subst[Int[x^( 2*m + 1)*(e*f - d*g + g*x^2)^n*(c*d^2 - b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4)^p, x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && IGtQ[p, 0] && ILtQ[n, 0] && IntegerQ[m + 1/2]
Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]
Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_ )^4)^(p_.), x_Symbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && Int egerQ[(m - 1)/2]
Int[((f_.)*(x_))^(m_.)*((d1_) + (e1_.)*(x_)^(non2_.))^(q_.)*((d2_) + (e2_.) *(x_)^(non2_.))^(q_.)*((a_.) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_.), x _Symbol] :> Simp[(d1 + e1*x^(n/2))^FracPart[q]*((d2 + e2*x^(n/2))^FracPart[ q]/(d1*d2 + e1*e2*x^n)^FracPart[q]) Int[(f*x)^m*(d1*d2 + e1*e2*x^n)^q*(a + b*x^n + c*x^(2*n))^p, x], x] /; FreeQ[{a, b, c, d1, e1, d2, e2, f, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[non2, n/2] && EqQ[d2*e1 + d1*e2, 0]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.44 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.54
method | result | size |
default | \(-\frac {\sqrt {-e x +d}\, \sqrt {e x +d}\, \left (\operatorname {csgn}\left (d \right ) c d \,e^{2} x^{2} \sqrt {-e^{2} x^{2}+d^{2}}+3 \sqrt {-e^{2} x^{2}+d^{2}}\, \operatorname {csgn}\left (d \right ) b d \,e^{2}+2 \sqrt {-e^{2} x^{2}+d^{2}}\, \operatorname {csgn}\left (d \right ) c \,d^{3}+3 \ln \left (\frac {2 d \left (\sqrt {-e^{2} x^{2}+d^{2}}\, \operatorname {csgn}\left (d \right )+d \right )}{x}\right ) a \,e^{4}\right ) \operatorname {csgn}\left (d \right )}{3 d \sqrt {-e^{2} x^{2}+d^{2}}\, e^{4}}\) | \(143\) |
-1/3*(-e*x+d)^(1/2)*(e*x+d)^(1/2)/d*(csgn(d)*c*d*e^2*x^2*(-e^2*x^2+d^2)^(1 /2)+3*(-e^2*x^2+d^2)^(1/2)*csgn(d)*b*d*e^2+2*(-e^2*x^2+d^2)^(1/2)*csgn(d)* c*d^3+3*ln(2*d*((-e^2*x^2+d^2)^(1/2)*csgn(d)+d)/x)*a*e^4)*csgn(d)/(-e^2*x^ 2+d^2)^(1/2)/e^4
Time = 0.27 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.86 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=\frac {3 \, a e^{4} \log \left (\frac {\sqrt {e x + d} \sqrt {-e x + d} - d}{x}\right ) - {\left (c d e^{2} x^{2} + 2 \, c d^{3} + 3 \, b d e^{2}\right )} \sqrt {e x + d} \sqrt {-e x + d}}{3 \, d e^{4}} \]
1/3*(3*a*e^4*log((sqrt(e*x + d)*sqrt(-e*x + d) - d)/x) - (c*d*e^2*x^2 + 2* c*d^3 + 3*b*d*e^2)*sqrt(e*x + d)*sqrt(-e*x + d))/(d*e^4)
Result contains complex when optimal does not.
Time = 18.14 (sec) , antiderivative size = 304, normalized size of antiderivative = 3.27 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=\frac {i a {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4}, 1 & 1, 1, \frac {3}{2} \\\frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2} & 0 \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} - \frac {a {G_{6, 6}^{2, 6}\left (\begin {matrix} 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 1 & \\\frac {1}{4}, \frac {3}{4} & 0, \frac {1}{2}, \frac {1}{2}, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d} - \frac {i b d {G_{6, 6}^{6, 2}\left (\begin {matrix} - \frac {1}{4}, \frac {1}{4} & 0, 0, \frac {1}{2}, 1 \\- \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 0 & \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{2}} - \frac {b d {G_{6, 6}^{2, 6}\left (\begin {matrix} -1, - \frac {3}{4}, - \frac {1}{2}, - \frac {1}{4}, 0, 1 & \\- \frac {3}{4}, - \frac {1}{4} & -1, - \frac {1}{2}, - \frac {1}{2}, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{2}} - \frac {i c d^{3} {G_{6, 6}^{6, 2}\left (\begin {matrix} - \frac {5}{4}, - \frac {3}{4} & -1, -1, - \frac {1}{2}, 1 \\- \frac {3}{2}, - \frac {5}{4}, -1, - \frac {3}{4}, - \frac {1}{2}, 0 & \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{4}} - \frac {c d^{3} {G_{6, 6}^{2, 6}\left (\begin {matrix} -2, - \frac {7}{4}, - \frac {3}{2}, - \frac {5}{4}, -1, 1 & \\- \frac {7}{4}, - \frac {5}{4} & -2, - \frac {3}{2}, - \frac {3}{2}, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e^{4}} \]
I*a*meijerg(((3/4, 5/4, 1), (1, 1, 3/2)), ((1/2, 3/4, 1, 5/4, 3/2), (0,)), d**2/(e**2*x**2))/(4*pi**(3/2)*d) - a*meijerg(((0, 1/4, 1/2, 3/4, 1, 1), ()), ((1/4, 3/4), (0, 1/2, 1/2, 0)), d**2*exp_polar(-2*I*pi)/(e**2*x**2))/ (4*pi**(3/2)*d) - I*b*d*meijerg(((-1/4, 1/4), (0, 0, 1/2, 1)), ((-1/2, -1/ 4, 0, 1/4, 1/2, 0), ()), d**2/(e**2*x**2))/(4*pi**(3/2)*e**2) - b*d*meijer g(((-1, -3/4, -1/2, -1/4, 0, 1), ()), ((-3/4, -1/4), (-1, -1/2, -1/2, 0)), d**2*exp_polar(-2*I*pi)/(e**2*x**2))/(4*pi**(3/2)*e**2) - I*c*d**3*meijer g(((-5/4, -3/4), (-1, -1, -1/2, 1)), ((-3/2, -5/4, -1, -3/4, -1/2, 0), ()) , d**2/(e**2*x**2))/(4*pi**(3/2)*e**4) - c*d**3*meijerg(((-2, -7/4, -3/2, -5/4, -1, 1), ()), ((-7/4, -5/4), (-2, -3/2, -3/2, 0)), d**2*exp_polar(-2* I*pi)/(e**2*x**2))/(4*pi**(3/2)*e**4)
Time = 0.31 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.13 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {\sqrt {-e^{2} x^{2} + d^{2}} c x^{2}}{3 \, e^{2}} - \frac {a \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} d}{{\left | x \right |}}\right )}{d} - \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} c d^{2}}{3 \, e^{4}} - \frac {\sqrt {-e^{2} x^{2} + d^{2}} b}{e^{2}} \]
-1/3*sqrt(-e^2*x^2 + d^2)*c*x^2/e^2 - a*log(2*d^2/abs(x) + 2*sqrt(-e^2*x^2 + d^2)*d/abs(x))/d - 2/3*sqrt(-e^2*x^2 + d^2)*c*d^2/e^4 - sqrt(-e^2*x^2 + d^2)*b/e^2
Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (79) = 158\).
Time = 0.44 (sec) , antiderivative size = 189, normalized size of antiderivative = 2.03 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {\frac {3 \, a e^{4} \log \left ({\left | -\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} + \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}} + 2 \right |}\right )}{d} - \frac {3 \, a e^{4} \log \left ({\left | -\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} + \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}} - 2 \right |}\right )}{d} + {\left (3 \, c d^{2} + 3 \, b e^{2} + {\left ({\left (e x + d\right )} c - 2 \, c d\right )} {\left (e x + d\right )}\right )} \sqrt {e x + d} \sqrt {-e x + d}}{3 \, e^{4}} \]
-1/3*(3*a*e^4*log(abs(-(sqrt(2)*sqrt(d) - sqrt(-e*x + d))/sqrt(e*x + d) + sqrt(e*x + d)/(sqrt(2)*sqrt(d) - sqrt(-e*x + d)) + 2))/d - 3*a*e^4*log(abs (-(sqrt(2)*sqrt(d) - sqrt(-e*x + d))/sqrt(e*x + d) + sqrt(e*x + d)/(sqrt(2 )*sqrt(d) - sqrt(-e*x + d)) - 2))/d + (3*c*d^2 + 3*b*e^2 + ((e*x + d)*c - 2*c*d)*(e*x + d))*sqrt(e*x + d)*sqrt(-e*x + d))/e^4
Time = 9.75 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.73 \[ \int \frac {a+b x^2+c x^4}{x \sqrt {d-e x} \sqrt {d+e x}} \, dx=\frac {a\,\left (\ln \left (\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2}-1\right )-\ln \left (\frac {\sqrt {d+e\,x}-\sqrt {d}}{\sqrt {d-e\,x}-\sqrt {d}}\right )\right )}{d}-\frac {\sqrt {d-e\,x}\,\left (\frac {2\,c\,d^3}{3\,e^4}+\frac {c\,x^3}{3\,e}+\frac {c\,d\,x^2}{3\,e^2}+\frac {2\,c\,d^2\,x}{3\,e^3}\right )}{\sqrt {d+e\,x}}-\frac {\left (\frac {b\,d}{e^2}+\frac {b\,x}{e}\right )\,\sqrt {d-e\,x}}{\sqrt {d+e\,x}} \]
(a*(log(((d + e*x)^(1/2) - d^(1/2))^2/((d - e*x)^(1/2) - d^(1/2))^2 - 1) - log(((d + e*x)^(1/2) - d^(1/2))/((d - e*x)^(1/2) - d^(1/2)))))/d - ((d - e*x)^(1/2)*((2*c*d^3)/(3*e^4) + (c*x^3)/(3*e) + (c*d*x^2)/(3*e^2) + (2*c*d ^2*x)/(3*e^3)))/(d + e*x)^(1/2) - (((b*d)/e^2 + (b*x)/e)*(d - e*x)^(1/2))/ (d + e*x)^(1/2)